package echo.vo;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单类
 */

public class Order {
    /**
     * 订单id
     */
    private String orderId;
    /**
     * 商品
     */
    private List<Item> items;
    /**
     * 订单状态
     */
    private OrderStatus status;
    /**
     * 订单总价
     */
    private double totalprice;
    /**
     * 订单创建时间
     */
    private LocalDateTime createtime;


    public Order() {
    }

    public Order(String orderId, List<Item> items, OrderStatus status, double totalprice, LocalDateTime createtime) {
        this.orderId = orderId;
        this.items = items;
        this.status = status;
        this.totalprice = totalprice;
        this.createtime = createtime;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public List<Item> getItems() {
        return items;
    }

    public void setItems(List<Item> items) {
        this.items = items;
    }

    public OrderStatus getStatus() {
        return status;
    }

    public void setStatus(OrderStatus status) {
        this.status = status;
    }

    public double getTotalprice() {
        return totalprice;
    }

    public void setTotalprice(double totalprice) {
        this.totalprice = totalprice;
    }

    public LocalDateTime getCreatetime() {
        return createtime;
    }

    public void setCreatetime(LocalDateTime createtime) {
        this.createtime = createtime;
    }


    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", items=" + items +
                ", status=" + status +
                ", totalprice=" + totalprice +
                ", createtime=" + createtime +
                '}';
    }
}
